package com.tjetc.字符流;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class T04缓冲流 {
    public static void main(String[] args) throws IOException {
        //开管放大袋子
      /*  BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("a.txt"));
        for (int i = 0; i < 5; i++) {
            bufferedWriter.write("hello"+i);
            bufferedWriter.newLine();//添加换行符
        }
        bufferedWriter.close();//关管*/
        BufferedReader bufferedReader = new BufferedReader(new FileReader("a.txt"));
        String line ;
        while((line=bufferedReader.readLine())!=null){
            System.out.println(line);
        }
        bufferedReader.close();
    }
}
